package com.mumu.quratz.test;

/**
 * @author mumu
 * @version 1.0
 * @date 2024/1/7 17:13
 * @describe
 */
public class A implements Cloneable {
    int a = 5;
    int b = 10;
    B bb = new B();

    public static void main(String[] args) throws CloneNotSupportedException {
        A a1 = new A();
        System.out.println(a1.bb.hashCode());
        A clone = a1.clone();
        System.out.println(clone.bb.hashCode());
        clone.bb.c = 19;
        System.out.println(a1.bb.c);
    }

    @Override
    protected A clone() throws CloneNotSupportedException {
        return (A) super.clone();
    }
}

class B {
    int c = 15;
}
